package com.kkshop.admin;

import java.util.ResourceBundle;

import org.springframework.context.support.AbstractApplicationContext;

public enum SupportedCommand {
    
    addUser(new AddUserCommand()),
    updateUser(new UpdateUserCommand()),
    removeUser(new RemoveUserCommand()),
    exportData(new ExportDataCommand()),
    importData(new ImportDataCommand());
    
    private CommandHandler command;
    
    private SupportedCommand(CommandHandler command) {
        this.command = command;
    }
    
    public int executeCommand(AbstractApplicationContext applicationContext, ResourceBundle properties) {
        return command.execute(applicationContext, properties);
    }
}
